home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / lib / config / setbase.c < prev    next >
C/C++ Source or Header  |  1996-07-22  |  435b  |  14 lines

  1.  
  2. #include "config.p"
  3.  
  4. void setbase(char *base)
  5. {
  6.     int
  7.         len = strlen(base);
  8.                                             /* extend basepath 2 chars */
  9.     base_path = xrealloc(xstrdup(base), len + 2);
  10.                                                         
  11.                                             /* no / at the end ? */
  12.     if (base_path[len - 1] != '/')
  13.         strcat(base_path, "/");             /* then append it */
  14. }